# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Firmicus <francois.archlinux.org>
# Contributor: Tom Killian <tomk@runbox.com>
# Contributor: FJ <joostef@gmail.com>

pkgname=perl-template-toolkit
pkgver=3.101
pkgrel=2
pkgdesc="Perl template processing system"
arch=('loong64' 'x86_64')
url="https://search.cpan.org/dist/Template-Toolkit/"
license=('PerlArtistic')
depends=('perl-appconfig' 'perl')
checkdepends=('perl-cgi' 'perl-image-info' 'perl-test-leaktrace')
options=('!emptydirs')
source=(https://search.cpan.org/CPAN/authors/id/A/AB/ABW/Template-Toolkit-$pkgver.tar.gz)
sha512sums=('7e74b1317a7fc113161999c9eeb63bdbee9ed8ff843bd4388039a683976eb71cd4ee2af7fecab639f3be7ef17386a45a6065a4eac6b599b5a0cc2f235d34962f')

build() {
  cd Template-Toolkit-$pkgver
  perl Makefile.PL INSTALLDIRS=vendor TT_ACCEPT=y
  make
}

check() {
  cd Template-Toolkit-$pkgver
  make test
}

package() {
  cd Template-Toolkit-$pkgver
  make install DESTDIR="${pkgdir}"
}
